<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h2>arguments对象</h2>
    <p>该对象用于描述函数的实际参数，它是一个数组对象。</p>
    <script>
        function show() {
            // length属性：描述函数的实际参数个数
            let length = arguments.length;
            console.log("length = ",length);

            // 遍历arguments对象，可以获取到每个实际参数。
            for (let i = 0;i < length;i ++) {
                console.log(arguments[i]);
            }
        }

        show("1",1);
        show("1");
    </script>
</body>
</html>